<template>
    <el-card class="error-card" @click.native="$emit('handle-error',errorMessage)">
        <div style="padding-left: 25px;">
            <h1 style="color: #F56C6C;"><i class="el-icon-warning" style="font-size: 1.8em;margin-right: 0.5em;"></i>糟糕！</h1>
            <p style="font-size: 1.5em;">{{title}}列表加载出错了，点击重试。</p>
            <p>错误原因：{{errorMessage}}</p>
        </div>
    </el-card>
</template>

<script>
    export default {
        name: "TableError",
        props: {
            isError: {
                type: Boolean,
                default: false,
            },
            errorMessage: {
                type: String,
                default: "",
            },
            title: {
                type: String,
                default: "",
            }
        }
    }
</script>

<style scoped>
    .error-card{
        cursor: pointer;
        height: 100%;
        width: 100%;
    }
</style>